<script>
import { h } from "vue";
// import { useStore } from "vuex";

export default {
  name: "XtxBread",
  render() {
    // const store = useStore();
    // store.dispatch("category/asyForce", 1);
    // console.log(store.state.category);
    let enterArr = this.$slots.default();

    let length = enterArr.length;

    let leaveArr = [];
    enterArr.forEach((item, index) => {
      leaveArr.push(item);
      if (index < length - 1) {
        leaveArr.push(h("i", { class: "iconfont icon-angle-right" }));
      }
    });
    // console.log(leaveArr);

    return h("span", { class: "xtx-bread" }, leaveArr);
  },
};
</script>

<style scoped lang="less">
.xtx-bread {
  display: flex;
  padding: 25px 10px;

  i {
    font-size: 12px;
    margin-left: 5px;
    margin-right: 5px;
    line-height: 22px;
  }
}
</style>
